package com.ruoyi.student_club.vo;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;

/**
 * @Author lin
 * @Date 2022/1/14 15:15
 */
@Data
public class ClubVo extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 社团id */
    private Long clubId;

    /** 类型id  */
    private Integer typeId;

    /** 社团类型 */
    @Excel(name = "社团类型")
    private String typeName;

    /** 社团名称 */
    @Excel(name = "社团名称")
    private String clubName;

    /** 社团头像 */
    @Excel(name = "社团头像")
    private String avatar;

    /** 社团简介 */
    @Excel(name = "社团简介")
    private String introduce;

    public void setAvatar(String avatar) {
        if (avatar != null && avatar.contains("upload")){
            this.avatar = avatar.substring(avatar.indexOf("upload")-1);
        }
    }
}
